/*
 * @Author: your name
 * @Date: 2021-09-05 13:11:49
 * @LastEditTime: 2021-12-21 14:21:41
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \xbsg-platform-ui\src\api\smartParks\property\propertySupplies.js
 */
import request from '@/utils/request'

// 查询物资管理列表
export function listmaMaterial(query) {
  return request({
    url: '/park/maMaterial/list',
    method: 'get',
    params: query
  })
}// 查询物资管理列表v2
export function listByWarehouse(query) {
  return request({
    url: '/park/maMaterial/listByWarehouse',
    method: 'get',
    params: query
  })
}

// 查询物资管理列表
export function listmaMaterialV2(query) {
  return request({
    url: '/park/maMaterial/listStock',
    method: 'get',
    params: query
  })
}


// 查询物资管理详细
export function getmaMaterial(id) {
  return request({
    url: '/park/maMaterial/' + id,
    method: 'get'
  })
}

// 新增物资管理
export function addmaMaterial(data) {
  return request({
    url: '/park/maMaterial',
    method: 'post',
    data: data
  })
}

// 修改物资管理
export function updatemaMaterial(data) {
  return request({
    url: '/park/maMaterial',
    method: 'put',
    data: data
  })
}

// 删除物资管理
export function delmaMaterial(id) {
  return request({
    url: '/park/maMaterial/' + id,
    method: 'delete'
  })
}

// 删除物资库存
export function delHouseMaMaterial(id) {
  return request({
    url: '/park/maMaterial/delete/' + id,
    method: 'delete'
  })
}
